from wordlist_core import wordlist_core

def main():
    while True:
        word = ''
        mean = ''
        addition = ''
        print('w')
        word=input()
        print('m')
        mean=input()
        print('?')
        star=input()
        if star=='y' or star=='Y':
            star=True
        else:
            star=False
        if word!='' and mean!='':
            wl.addword(word,mean,addition,star)

def aa():
    f1=open("./word.txt")
    f2=open('./mean.txt')
    for i in range(0,5500):
        words=f1.readline()
        means=f2.readline()
        word=words.strip()
        mean=means.strip()
        #word=words[0:len(words)-1]
        #mean=means[0:len(words)-1] 导致莫名其妙的断句问题
        print(word,mean)
        if word!='' and mean!='':
            # wl.modifword(word,mean=mean)
            wl.addword(word,mean,'',False)

if __name__ == "__main__":
    wl = wordlist_core('./test.db')
    main()
    # aa()
